<?php
namespace ImiApp\Module\Member\Model\Base;

use Imi\Model\Model as Model;
use Imi\Model\Annotation\DDL;
use Imi\Model\Annotation\Table;
use Imi\Model\Annotation\Column;
use Imi\Model\Annotation\Entity;

/**
 * 用户聊天记录 基类
 * @Entity
 * @Table(name="fa_chat", id={"id"})
 * @DDL("CREATE TABLE `fa_chat` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `nickname` varchar(255) DEFAULT NULL COMMENT '昵称',
  `zu` varchar(30) DEFAULT NULL COMMENT '组',
  `content` varchar(5555) DEFAULT NULL COMMENT '内容',
  `send_time` int(10) DEFAULT NULL COMMENT '发送时间',
  `ip` varchar(255) DEFAULT NULL COMMENT 'IP地址',
  `group` varchar(100) DEFAULT NULL COMMENT '组名',
  `time` int(10) DEFAULT NULL COMMENT '时间',
  `send_uid` int(10) DEFAULT NULL COMMENT '发送人',
  `re_uid` int(10) DEFAULT NULL COMMENT '接收人',
  `type` enum('1','2','3','4','5','6','7','8','9','10','11','12','13') DEFAULT '1' COMMENT '类型:1=普通消息,2=心跳,3=订单号,4=用户确认报价,5=商家同意报价,6=用户评价订单,7=消息已读,10=语音,11=图片,12=文件',
  `msg_status` enum('1','2') DEFAULT '1' COMMENT '消息状态:1=对方未读,2=已读',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='用户聊天记录'")
 * @property int $id 
 * @property string $nickname 昵称
 * @property string $zu 组
 * @property string $content 内容
 * @property int $sendTime 发送时间
 * @property string $ip IP地址
 * @property string $group 组名
 * @property int $time 时间
 * @property int $sendUid 发送人
 * @property int $reUid 接收人
 * @property string $type 类型:1=普通消息,2=心跳,3=订单号,4=用户确认报价,5=商家同意报价,6=用户评价订单,7=消息已读,10=语音,11=图片,12=文件
 * @property string $msgStatus 消息状态:1=对方未读,2=已读
 */
abstract class ChatBase extends Model
{
    /**
     * id
     * @Column(name="id", type="int", length=10, accuracy=0, nullable=false, default="", isPrimaryKey=true, primaryKeyIndex=0, isAutoIncrement=true)
     * @var int
     */
    protected $id;

    /**
     * 获取 id
     *
     * @return int
     */ 
    public function getId()
    {
        return $this->id;
    }

    /**
     * 赋值 id
     * @param int $id id
     * @return static
     */ 
    public function setId($id)
    {
        $this->id = $id;
        return $this;
    }

    /**
     * 昵称
     * nickname
     * @Column(name="nickname", type="varchar", length=255, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $nickname;

    /**
     * 获取 nickname - 昵称
     *
     * @return string
     */ 
    public function getNickname()
    {
        return $this->nickname;
    }

    /**
     * 赋值 nickname - 昵称
     * @param string $nickname nickname
     * @return static
     */ 
    public function setNickname($nickname)
    {
        $this->nickname = $nickname;
        return $this;
    }

    /**
     * 组
     * zu
     * @Column(name="zu", type="varchar", length=30, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $zu;

    /**
     * 获取 zu - 组
     *
     * @return string
     */ 
    public function getZu()
    {
        return $this->zu;
    }

    /**
     * 赋值 zu - 组
     * @param string $zu zu
     * @return static
     */ 
    public function setZu($zu)
    {
        $this->zu = $zu;
        return $this;
    }

    /**
     * 内容
     * content
     * @Column(name="content", type="varchar", length=5555, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $content;

    /**
     * 获取 content - 内容
     *
     * @return string
     */ 
    public function getContent()
    {
        return $this->content;
    }

    /**
     * 赋值 content - 内容
     * @param string $content content
     * @return static
     */ 
    public function setContent($content)
    {
        $this->content = $content;
        return $this;
    }

    /**
     * 发送时间
     * send_time
     * @Column(name="send_time", type="int", length=10, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var int
     */
    protected $sendTime;

    /**
     * 获取 sendTime - 发送时间
     *
     * @return int
     */ 
    public function getSendTime()
    {
        return $this->sendTime;
    }

    /**
     * 赋值 sendTime - 发送时间
     * @param int $sendTime send_time
     * @return static
     */ 
    public function setSendTime($sendTime)
    {
        $this->sendTime = $sendTime;
        return $this;
    }

    /**
     * IP地址
     * ip
     * @Column(name="ip", type="varchar", length=255, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $ip;

    /**
     * 获取 ip - IP地址
     *
     * @return string
     */ 
    public function getIp()
    {
        return $this->ip;
    }

    /**
     * 赋值 ip - IP地址
     * @param string $ip ip
     * @return static
     */ 
    public function setIp($ip)
    {
        $this->ip = $ip;
        return $this;
    }

    /**
     * 组名
     * group
     * @Column(name="group", type="varchar", length=100, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $group;

    /**
     * 获取 group - 组名
     *
     * @return string
     */ 
    public function getGroup()
    {
        return $this->group;
    }

    /**
     * 赋值 group - 组名
     * @param string $group group
     * @return static
     */ 
    public function setGroup($group)
    {
        $this->group = $group;
        return $this;
    }

    /**
     * 时间
     * time
     * @Column(name="time", type="int", length=10, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var int
     */
    protected $time;

    /**
     * 获取 time - 时间
     *
     * @return int
     */ 
    public function getTime()
    {
        return $this->time;
    }

    /**
     * 赋值 time - 时间
     * @param int $time time
     * @return static
     */ 
    public function setTime($time)
    {
        $this->time = $time;
        return $this;
    }

    /**
     * 发送人
     * send_uid
     * @Column(name="send_uid", type="int", length=10, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var int
     */
    protected $sendUid;

    /**
     * 获取 sendUid - 发送人
     *
     * @return int
     */ 
    public function getSendUid()
    {
        return $this->sendUid;
    }

    /**
     * 赋值 sendUid - 发送人
     * @param int $sendUid send_uid
     * @return static
     */ 
    public function setSendUid($sendUid)
    {
        $this->sendUid = $sendUid;
        return $this;
    }

    /**
     * 接收人
     * re_uid
     * @Column(name="re_uid", type="int", length=10, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var int
     */
    protected $reUid;

    /**
     * 获取 reUid - 接收人
     *
     * @return int
     */ 
    public function getReUid()
    {
        return $this->reUid;
    }

    /**
     * 赋值 reUid - 接收人
     * @param int $reUid re_uid
     * @return static
     */ 
    public function setReUid($reUid)
    {
        $this->reUid = $reUid;
        return $this;
    }

    /**
     * 类型:1=普通消息,2=心跳,3=订单号,4=用户确认报价,5=商家同意报价,6=用户评价订单,7=消息已读,10=语音,11=图片,12=文件
     * type
     * @Column(name="type", type="enum", length=0, accuracy=0, nullable=true, default="1", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $type;

    /**
     * 获取 type - 类型:1=普通消息,2=心跳,3=订单号,4=用户确认报价,5=商家同意报价,6=用户评价订单,7=消息已读,10=语音,11=图片,12=文件
     *
     * @return string
     */ 
    public function getType()
    {
        return $this->type;
    }

    /**
     * 赋值 type - 类型:1=普通消息,2=心跳,3=订单号,4=用户确认报价,5=商家同意报价,6=用户评价订单,7=消息已读,10=语音,11=图片,12=文件
     * @param string $type type
     * @return static
     */ 
    public function setType($type)
    {
        $this->type = $type;
        return $this;
    }

    /**
     * 消息状态:1=对方未读,2=已读
     * msg_status
     * @Column(name="msg_status", type="enum", length=0, accuracy=0, nullable=true, default="1", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $msgStatus;

    /**
     * 获取 msgStatus - 消息状态:1=对方未读,2=已读
     *
     * @return string
     */ 
    public function getMsgStatus()
    {
        return $this->msgStatus;
    }

    /**
     * 赋值 msgStatus - 消息状态:1=对方未读,2=已读
     * @param string $msgStatus msg_status
     * @return static
     */ 
    public function setMsgStatus($msgStatus)
    {
        $this->msgStatus = $msgStatus;
        return $this;
    }

}
